package com.pachong.service.impl;

import com.domain.bean.music.MusicUser;
import com.domain.bean.music.SongMenu;
import com.pachong.common.impl.BaseServiceImpl;
import com.pachong.service.MusicUserService;
import com.pachong.service.SongMenuService;
import com.wy.dao.music.SongMenuDAO;
import com.wy.dao.sys.BaseDAO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author : wangyu
 * Date: 2018-03-05
 * Time: 14:10
 */
@Service
public class SongMenuServiceImpl extends BaseServiceImpl<SongMenu,Integer> implements SongMenuService {

    @Autowired
    private SongMenuDAO songMenuDAO;

    @Override
    public BaseDAO<SongMenu, Integer> getBaseDao() {
        return songMenuDAO;
    }

    @Override
    public SongMenu findByCode(String code) {
        if(StringUtils.isNotBlank(code)){
            return songMenuDAO.findByCode(code);
        }
        return null;
    }

    @Override
    public List<SongMenu> selectLimt(int time) {
        return songMenuDAO.selectLimt(time);
    }
}
